package com.ruoyi.lab.service.impl;

import java.util.List;

import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.lab.mapper.LabSupplierMapper;
import com.ruoyi.lab.domain.LabSupplier;
import com.ruoyi.lab.service.ILabSupplierService;

/**
 * 供应商Service业务层处理
 * 
 * @author mojar
 * @date 2024-10-11
 */
@Service
public class LabSupplierServiceImpl extends ServiceImpl<LabSupplierMapper, LabSupplier> implements ILabSupplierService
{
    @Autowired
    private LabSupplierMapper labSupplierMapper;


    @Override
    public List<LabSupplier> queryList(LabSupplier labSupplier) {
        LambdaQueryWrapper<LabSupplier> queryWrapper = new LambdaQueryWrapper<>();
        if(StrUtil.isNotBlank(labSupplier.getSupplierName())){
            queryWrapper.eq(LabSupplier::getSupplierName,labSupplier.getSupplierName());
        }
        queryWrapper.eq(LabSupplier::getDelFlag,'0');
        return labSupplierMapper.selectList(queryWrapper);
    }
}
